package com.example.springgateway.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @createBy guoq
 * @createTime 2019/4/12
 * @describe
 */
@RestController
@Tag(name="服务网关")
@RequestMapping("/gateway")
@Slf4j
public class GatewayController {

    @GetMapping("/fallback")
    @Operation(summary ="服务网关-降级")
    public String fallback() {
        return "hello this is a fallback from gateway";
    }
//    @GetMapping("/white")
//    @Operation(summary ="服务网关-转发到client的white")
//    public void white() {
//       log.info("调取消费端接口");
//    }
}
